package com.test.project.system.fankui.service.impl;

import com.test.common.utils.DateUtils;
import com.test.common.utils.security.ShiroUtils;
import com.test.common.utils.text.Convert;
import com.test.project.system.fankui.domain.TFankui;
import com.test.project.system.fankui.mapper.TFankuiMapper;
import com.test.project.system.fankui.service.ITFankuiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 意见反馈Service业务层处理
 * 
 * @author test
 * @date 2022-01-13
 */
@Service
public class TFankuiServiceImpl implements ITFankuiService
{
    @Autowired
    private TFankuiMapper tFankuiMapper;

    /**
     * 查询意见反馈
     * 
     * @param id 意见反馈ID
     * @return 意见反馈
     */
    @Override
    public TFankui selectTFankuiById(Long id)
    {
        return tFankuiMapper.selectTFankuiById(id);
    }

    /**
     * 查询意见反馈列表
     * 
     * @param tFankui 意见反馈
     * @return 意见反馈
     */
    @Override
    public List<TFankui> selectTFankuiList(TFankui tFankui)
    {
        return tFankuiMapper.selectTFankuiList(tFankui);
    }

    /**
     * 新增意见反馈
     * 
     * @param tFankui 意见反馈
     * @return 结果
     */
    @Override
    public int insertTFankui(TFankui tFankui)
    {
        
        
        
        
        tFankui.setCreateTime(DateUtils.getNowDate());
        
        tFankui.setCreateBy(ShiroUtils.getLoginName());
        
        return tFankuiMapper.insertTFankui(tFankui);
    }

    /**
     * 修改意见反馈
     * 
     * @param tFankui 意见反馈
     * @return 结果
     */
    @Override
    public int updateTFankui(TFankui tFankui)
    {
        return tFankuiMapper.updateTFankui(tFankui);
    }

    /**
     * 删除意见反馈对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTFankuiByIds(String ids)
    {
        return tFankuiMapper.deleteTFankuiByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除意见反馈信息
     * 
     * @param id 意见反馈ID
     * @return 结果
     */
    @Override
    public int deleteTFankuiById(Long id)
    {
        return tFankuiMapper.deleteTFankuiById(id);
    }
}
